package com.yangjian.main;

public class JJPoint3d extends JJPoint2d{
	
	float z;
		
	public JJPoint3d(float x, float y, float z) {
		super(x, y);
		this.z = z;
	}
	
	public double distance() {
		return Math.sqrt(x * x + y * y + z * z);
	}
	public String toString() {
		return super.toString().replace(")", "," + z + ")");
	}
	
}
